/**
 * @Author: ls-mac
 * @Date:   2018-09-25T13:01:02+08:00
 * @Last modified by:   ls-mac
 * @Last modified time: 2018-11-13T15:29:25+08:00
 */

import { notification, message } from 'antd';

export default function errorMsg(resp) {
  if (resp && resp.message) {
    if (resp.message.length > 100) {
      message.error(resp.message.substr(0, 100));
    } else {
      message.error(resp.message);
    }
  } else {
    message.error('系统或者网络异常');
  }
}
